<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page language="java" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
	<title>完美校园新闻</title>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/web/css/news.css">
</head>
<body>
	<div class="header_fixed">
		<div class="header text_center">
			<span class="back"><img src="${pageContext.request.contextPath}/web/images/back.png">返回</span>
			新闻首页
			<span class="close">关闭</span>
		</div>
	
	<!-- 导航 -->
    <nav>
    	<div class="nav_scrollbar text_center">
	        <ul>
				<c:forEach items="${columnList}" var="c">
	            	<a href="main.html?columnId=${c.id}"><li class="nav_scrollbar_on">${c.name}</li></a>
				</c:forEach>

	        </ul>
	    </div>
	    <div class="nav_more text_center dn"><img src="images/nav_icon.png"></div>
    </nav>
    </div>
    <div class="news_list">
    	<div class="container">
    		<!-- 列表 i -->
	    	<c:forEach items="${newsList}" var="n">
				<a href="newsContent.html?id=${n.id}&columnId=${n.chnlcode}">
					<div class="news_list_content">
						<div class="news_list_content_left fl">
							<img src="/upload/${n.mainImg}">
						</div>
						<div class="news_list_content_right fr">
							<h3>${n.title}</h3>
						</div>
						<div class="date fr">${fn:substring(n.crtime,0,10)}</div>
					</div>
				</a>
			</c:forEach>
    	</div>
    </div>
</body>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</html>